import request from '@/utils/request'

export default {
  getUserInfo(id){
    return request({
      url: `/user/${id}`,
      method: 'get'
    })
  },
  editUserInfo(id, obj){
    return request({
      url: `/user_update/${id}`,
      method: 'post',
      data: {
        nickname: obj.nickname,
        password: obj.password,
        gender: obj.gender,
        head_img: obj.head_img
      }
    })
  },
  // 上传文件
  uploadFile(file){
    return request({
      url: '/upload',
      method: 'post',
      data: file
    })
  }
}
